package com.zyf.project.capchain.listener.state.excimpl;

import com.zyf.project.capchain.listener.state.State;

/**
 * @author Zhou Yifan
 */
public enum CommonExceptionState implements State {
    /**
     * 参数为空
     */
    EMPTY_PARAMS() {
        @Override
        public Integer code() {
            return 500;
        }

        @Override
        public String message() {
            return "参数为空/必要参数为空";
        }

        @Override
        public Boolean isSuccess() {
            return false;
        }
    },

    /**
     * 数据层错误
     */
    SQL_ERROR() {
        @Override
        public Integer code() {
            return 600;
        }

        @Override
        public String message() {
            return "数据层发生错误";
        }

        @Override
        public Boolean isSuccess() {
            return false;
        }
    },
}
